Skip to content

[mlir][dxsa] Add dcl_tgsm_raw instruction#138

Merged
tagolog merged 1 commit into
access-softek:dxsa-mlirfrom
tagolog:dxsa-mlir-dcl_tgsm_raw
May 27, 2026
Merged

[mlir][dxsa] Add dcl_tgsm_raw instruction#138
tagolog merged 1 commit into
access-softek:dxsa-mlirfrom
tagolog:dxsa-mlir-dcl_tgsm_raw

Conversation

@tagolog
Copy link
Copy Markdown

@tagolog tagolog commented May 25, 2026

Example:
dxsa.dcl_tgsm_raw <type = thread_group_shared_memory, components = 0, index = [0]>, 40

@tagolog tagolog requested a review from asavonic May 25, 2026 04:33
Copy link
Copy Markdown
Contributor

@asavonic asavonic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

(`,` `index` `=` $index^)?
`>`
}];
let assemblyFormat = "`<` struct(params) `>`";
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's nice, we need to use this shortcut for other instructions as well.

def DXSA_DclTgsmRaw : DXSA_Op<"dcl_tgsm_raw"> {
let summary = "declares a reference to a region of shared memory space";
let description = [{
The `dxsa.dcl_tgsm_raw` operation declares a reference to a region
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
The `dxsa.dcl_tgsm_raw` operation declares a reference to a region
The `dxsa.dcl_tgsm_raw` operation declares a reference to a Thread Group Shared Memory region.

Can we deabbreviate TGSM here?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Current description of the operation is a copy of the original description from the spec:
22.3.45 dcl_tgsm_raw (Raw Thread Group Shared Memory (g#) Declaration)

Description:    Declare a reference to a region of shared
                memory space available to the Compute
                Shader’s thread group.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Right, but the spec deabbreviates TGSM in the title, and here we need to look at the example to find out what it means.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed

Example:
  dxsa.dcl_tgsm_raw <type = thread_group_shared_memory, components = 0, index = [0]>, 40

Signed-off-by: Vladimir Shiryaev <tagolog@users.noreply.github.com>
@tagolog tagolog force-pushed the dxsa-mlir-dcl_tgsm_raw branch from 3a3f113 to 0654b0d Compare May 27, 2026 16:38
@tagolog tagolog merged commit ccd58cf into access-softek:dxsa-mlir May 27, 2026
@tagolog tagolog deleted the dxsa-mlir-dcl_tgsm_raw branch May 27, 2026 16:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants